﻿
using System ;
using System.Collections.Generic ;

using MskEdit.Sdk ;


namespace MskEdit.Dxf.Model
{

    public class DxfObjects
    {
        private string[]        allLines_ ;
        private SdkSubrange     subrange_ ;
        private DxfObject[]      tables_ ;
        
        
        private DxfObject[] getObjects( string [] allLines, SdkSubrange subrange ) {
       
            List<DxfObject> dxfObjects = new List<DxfObject>() ;
/*            
            DxfObject dxfObject = null ;
            int lineNo = subrange.Begin + 2 ;
            
            do {
            
                dxfObject = DxfObject.TryFrom( allLines, ref lineNo, null ) ;
                if ( dxfObject != null )
                    dxfObjects.Add( dxfObject ) ;
                    
            } while ( dxfObject != null ) ;
*/            
            return dxfObjects.ToArray() ;
        }


        public DxfObjects( string[] allLines, SdkSubrange subrange ) {
            allLines_ = allLines ;
            subrange_ = subrange ;
            
            tables_ = getObjects( allLines_, subrange ) ;
        }

        
        public void AddObject( DxfObject dxfSymbolObject ) {
        }
        
        
        public DxfObject[] Objects {
            get { return tables_ ; }
        }
    }
}
